package eu.webhib.frmwrk.dao;

import eu.webhib.frmwrk.dao.jpa.BaseDaoImpl;
import eu.webhib.frmwrk.domain.intf.BaseEntity;

public class DaoFactory {

   static DaoFactory instance = null;

   public static DaoFactory instance() {
      if (instance == null) {
         instance = new DaoFactory();
      }
      return instance;
   }

   public <T extends BaseEntity> BaseDaoImpl createDao(Class<T> persistentClass) {
      return new BaseDaoImpl<T>(persistentClass);
   }
}
